1. Field of the Invention
The present invention relates generally to automatic focusing apparatus and an automatic focusing methods and, more particularly, to improvements of automatic focusing apparatus and an automatic focusing method for automatically matching a focus relative to an object in response to a video signal obtained from an image sensor, in image sensing apparatus such as a video camera having an automatic focusing mechanism.
2. Description of the Background Art
Conventionally, as an automatic focusing method adopted in image sensing apparatus such as a video camera, for example, a method has been developed, in which a video signal per se obtained from an image sensor is employed to evaluate a state in which focus is controlled. In this method, no parallax substantially exists. The method has many excellent characteristics, e.g., accurate focusing is achieved even when the depth of field is small and when an object is located in the distance. Moreover, this method requires no special sensor for automatic focusing to be provided separately and provides an extremely simple mechanism.
As one example of the automatic focusing methods employing a video signal, a so-called hill-climbing servo system has been conventionally known. This hill-climbing servo system is described in U.S. Pat. application Nos. 4,638,364 and 4,614,975 and Japanese Patent Laying-Open Nos. 58-58505 and 60-103776. Briefly, in the hill-climbing servo system, a high frequency component of a video signal obtained from an image sensor is detected every one field as a focus evaluating value, and the detected focus evaluating value is always compared with a focus evaluating value detected one field before. Then, the position of a focusing lens continues slightly vibrating such that the focus evaluating value always takes the maximal value.
In addition, Japanese Patent Laying-Open No. 1-8771 discloses improved automatic focusing apparatus employing the hill-climbing servo system.
FIG. 1 is a schematic block diagram showing such improved automatic focusing apparatus, and FIG. 2 is a block diagram showing the details of a focus evaluating value generating circuit shown in FIG. 1.
With reference to FIG. 1, a video camera includes a focusing ring 2 for moving a focusing lens 1 forward and backward along an optical axis, a focusing motor 3 for driving this focusing ring 2, and an image sensing circuit 4 including an image sensor (not shown) such as a CCD (Charge-Coupled Device). Focusing lens 1 may be moved by a piezoelectric element instead of a motor. Further, the image sensor itself (not shown) such as the CCD in place of the focusing lens may be moved by the piezoelectric element.
An image formed on a surface of the image sensor by focusing lens 1 is converted into a video signal by image sensing circuit 4 and then applied as an input to a focus evaluating value generating circuit 5. With reference to FIG. 2 showing the details of focus evaluating value generating circuit 5, a luminance signal component in a video signal supplied as an output from image sensing circuit 4 is applied to a synchronization separating circuit 5a and a gate circuit 5c. Synchronization separating circuit 5a separates a vertical synchronizing signal VD and a horizontal synchronizing signal HD from the applied luminance signal, to apply the separated signals to a gate control circuit 5b. Gate control circuit 5b sets a rectangular sampling area (an in-focus target area) in, e.g., a central portion of a picture in response to the applied vertical synchronizing signal VD and horizontal synchronizing signal HD and a fixed output of an oscillator (not shown). Gate control circuit 5b then applies a signal for opening or closing a gate every field to gate circuit 5c so as to allow passage of the luminance signal only in the range of the sampling area. This gate circuit 5c may be provided anywhere at the preceding stage of an integrating circuit 5f which will be described later.
Only the luminance signal corresponding to the range of the sampling area is applied to a high-pass filter 5d by gate circuit 5c every field. A high frequency component of the video signal separated by high-pass filter 5d is amplitude-detected by a detecting circuit 5e, and a detection output thereof is applied to integrating circuit 5f. Integrating circuit 5f then integrates the applied detection output every field and applies the integrated output to an A/D converting circuit 5g. This A/D converting circuit 5g converts the applied integrated value into a digital value and supplies the digital value as a focus evaluating value in the present field.
A description is now made on an operation which is performed immediately after an automatic focusing operation starts. Immediately after the automatic focusing operation starts, a focus evaluating value corresponding to the first one field supplied as an output from focus evaluating value generating circuit 5 is first applied to a memory 6 for holding the maximum value and a memory 7 for holding the initial value and then held therein. Thereafter, a focusing motor control circuit 10 rotates focusing motor 3 in a predetermined direction, to displace focusing lens 1 along the optical axis. Then, a comparator 9 compares the initial focus evaluating value held in initial value memory 7 with the present focus evaluating value output from focus evaluating value generating circuit 5, to generate a comparison signal. Focusing motor control circuit 10 initializes the direction of the rotation of focusing motor 3 in response to the generated comparison signal.
More specifically, focusing motor control circuit 10 keeps rotating focusing motor 3 in the predetermined direction until comparator 9 generates a comparison output indicating "large" or "small". If comparator 9 supplies a comparison output indicating that the present focus evaluating value is larger than the initial focus evaluating value held in memory 7, focusing motor control circuit 10 maintains the above-described predetermined rotational direction. Conversely, if a comparison output indicating that the present focus evaluating value is smaller by more than a predetermined change width than the initial focus evaluating value is supplied by comparator 9, focusing motor control circuit 10 reverses the rotational direction of focusing motor 3.
The initialization of the rotational direction of focusing motor 3 is thus completed. Focusing motor control circuit 10 thereafter monitors an output of a comparator 8. In order to prevent malfunctions due to noise of the focus evaluating value, comparator 9 is adapted not to generate the comparison output indicating "large" or "small" while the difference between the initial focus evaluating value and the present focus evaluating value does not exceed the predetermined change width.
Comparator 8 compares the present maximum focus evaluating value so far held in maximum value memory 6 with the present focus evaluating value supplied by focus evaluating value generating circuit 5, to output a comparison signal S when the present focus evaluating value is larger than the focus evaluating value held in memory 6 and output a comparison signal S.sub.2 when the present focus evaluating value decreases by more than a predetermined first threshold value. When the present focus evaluating value is larger than the contents of memory 6, the contents of memory 6 is updated in response to the output S.sub.1 of comparator 8, so that the maximum focusing evaluating value so far is always held in memory 6.
A signal indicating the position of a focusing ring is generated from focusing ring 2 in correspondence with the position of focusing ring 2 supporting focusing lens 1. The generated focusing ring position signal is applied to a memory 13 for holding the position of the focusing ring. This focusing ring position memory 13 is updated in response to the output of comparator 8 so as to constantly hold a focusing ring position signal to be generated when the focus evaluating value becomes the maximum value.
Focusing motor control circuit 10 monitors the output of comparator 8 while rotating focusing motor 3 in the direction initialized in response to the output of comparator 9, as described above. When the comparison output S.sub.2 indicating that the present focus evaluating value decreases by more than the above-described first threshold value as compared with the maximum focus evaluating value is supplied by comparator 8, focusing motor control circuit 10 generates a signal for reversing the rotational direction of focusing motor 3. To prevent malfunctions due to noise of the focus evaluating value, the rotational direction of focusing motor 3 is not reversed until the present focus evaluating value decreases by more than the predetermined first threshold value. This reversal of the rotational direction of focusing motor 3 causes the direction, in which focusing lens 1 moves, to change from the direction, in which the focusing lens moves toward the image sensor, to the direction, in which the lens moves away from the image sensor, or vice versa.
After the rotational direction of focusing motor 3 is reversed, a comparator 14 compares the contents of memory 13, corresponding to the maximum focusing evaluating value, with the present focusing ring position signal generated from focusing ring 2. When both match each other, i.e., focusing ring 2 returns to the position where the focus evaluating value becomes the maximum value, focusing motor control circuit 10 stops the rotation of focusing motor 3. Simultaneously, focusing motor control circuit 10 outputs a lens stop signal LS. A series of automatic focusing operations are thus completed.
In the above-described manner, in the conventional automatic focusing apparatus shown in FIG. 1, the focusing evaluating value is evaluated with focusing lens 1 moving from a close point to a distant point. When the focusing evaluating value decreases by more than a predetermined threshold value below the maximum focusing evaluating value at a certain time point during the movement of focusing lens 1, a determination is made that a lens position where the above-described maximum value (hereinafter referred to as a peak value) is obtained is an in-focus position, so that the automatic focusing operation is terminated.
When an object having a small amount of a high frequency component such as walls having no design thereon or clouds in the sky, for example, is taken, there is a case that the above-described peak value of the focus evaluating value cannot be obtained even if the focusing lens is moved to cover the whole distance from a cross point to a distant point. It is now assumed that this mode is called an ETOE (END TO END) mode. In the ETOE mode, a determination is made that a lens position where the maximum value of the focus evaluating value is obtained is an in-focus position in the course of movement of the lens, so that the automatic focusing operation is terminated.
A memory 11 and a comparator 12 serve as circuits for restarting the automatic focusing operation by focusing motor control circuit 10 when the focus evaluating value changes by a predetermined second threshold value or more after the focusing lens stops. More specifically, a focus evaluating value at the time point when the automatic focusing operation by focusing motor control circuit 10 is terminated and lens stop signal LS is then generated is held in memory 11. Then, comparator 12 compares the contents of memory 11 with the present focus evaluating value supplied as an output from focus evaluating value generating circuit 5. If the difference therebetween becomes larger than the predetermined second threshold value, it is considered that an object changes, and a signal indicating the change of the object is applied to focusing motor control circuit 10. As a result, the automatic focusing operation by focusing motor control circuit 10 restarts, so that an automatic focusing operation following the change of the object is achieved.
Now, as manner of setting an in-focus target area (sampling area) to be a target of a focus control, such a method is considered that two types of in-focus target areas, i.e., the entire area of a picture and the central area thereof (which requires, e.g., 1/4 of the entire picture area) are provided, and these two areas are appropriately switched in response to an area selecting signal generated from the focusing motor control circuit in accordance with the situation of an object.
In this method, however, if the timing to select the in-focus target area is inappropriate, a user has a disordered impression that a malfunction takes place.
Such a case is now considered, for example, that when the central area of the picture is selected as the in-focus target area, to attain an in-focus state, the object moves from the center to the side of the picture out of the in-focus target area in the center. Since the object itself does not disappear from the picture, it is totally unnecessary for the user that the automatic focusing operation is re-activated. However, if the switching of the in-focus target area from the central area to the entire area of the picture is not smoothly performed, so that the central area continues to be selected as the in-focus target area, the focus evaluating value substantially decreases because the object in the central area disappears. Thus, the automatic focusing operation is re-started, so that lens 1 moves. As a result, a hunting sometimes occurs.
Conversely, such a case is considered that when the entire area of the picture is selected as the in-focus target area, to attain the in-focus state, the object moves from the periphery of the picture to the center and enters in the central area of the picture. In this case, if the switching of the in-focus target area from the entire area to the central area of the picture is not smoothly performed, so that the entire area of the picture is kept selected as the in-focus target area, the object in the central area of the picture, which is to be brought into focus, cannot be actually brought into focus if an object having a large amount of the high frequency component exists in the periphery of the picture.